package cn.yuanqiao.cqbc.dataManage.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * @author zjj
 * @date 2023/8/9
 */
@Data
public class Cqdatransdoc extends BaseEntity {
    private static final long serialVersionUID = 1L;

    public static final String BIGTABLENAME = "_CQBC_YQDATRANSDOC";

    public Cqdatransdoc() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            //throw new ServiceException("TenantCode is null");
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }

    private String tableName;

    private Long transId;

    //@Excel(name = "电子文件ID",sort = 1)
    private Long docId;
    @Excel(name = "转换时间",sort = 4,dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date transTime;
    @Excel(name = "转换前文件路径",sort = 6)
    private String originalUrl;
    @Excel(name = "文件名称",sort = 6)
    private String docName;
    @Excel(name = "转换后路径",sort = 5)
    private String transUrl;
    @Excel(name = "转换服务名称",sort = 6)
    private String transType;
    @Excel(name = "状态",readConverterExp = "0=失败,1=成功",sort = 7)
    private Integer state;
    //日志总表id
    private Long logId;
}
